import request from "@/utils/request";
import { encryptedData } from "@/utils/encrypt";
import { loginRSA, tokenName } from "@/config";

/**
 * 销售列表
 * @param {*} data
 * @returns
 */
export function API_salesList(params) {
  return request({
    url: "/sales/list",
    method: "get",
    params,
  });
}

/**
 * 销售新增
 * @returns
 */
export function API_salesCreate(data) {
  return request({
    url: "/sales/create",
    method: "post",
    data,
  });
}

/**
 * 销售修改
 * @returns
 */
export function API_salesEdit(data) {
  return request({
    url: "/sales/edit",
    method: "put",
    data,
  });
}

/**
 * 销售删除
 * @returns
 */
export function API_salesDelete() {
  return request({
    url: "/sales/delete",
    method: "delete",
    data,
  });
}

/**
 * 销售记录
 * @returns
 */
export function API_salesGet(params) {
  return request({
    url: "/sales/get",
    method: "get",
    params,
  });
}
